Summary filter transformation

ABSTRACT

A mechanism for summary filter transformation is provided. The mechanism comprises a summary filter analysis module for analyzing a multidimensional query that is not supported by a target database system, and a summary filter transformation module for transforming the multidimensional query into a semantically equivalent query that is supported by the target database system.

FIELD OF THE INVENTION

The invention relates generally to data access middleware, and inparticular to a system and method of summary filter transformation.

BACKGROUND OF THE INVENTION

A typical data access environment has a multi-tier architecture. Fordescription purposes, it can be separated into three distinct tiers:

-   -   Web server    -   Applications    -   Data        The tiers are based on business function, and are typically        separated by firewalls. Client software, such as a browser or a        report-authoring tool, sits above the tiers.

The web server contains a firewall and one or more gateways. All webcommunication is performed through a gateway. A gateway is responsiblefor passing on requests to the application server, in tier 2, forexecution.

The applications tier contains one or more application servers. Theapplication server runs requests, such as reports and queries that areforwarded by a gateway running on the web server. Typically, one of thecomponents of the applications tier is a query engine, which is dataaccess middleware that provides universal data access to a variety ofheterogeneous database systems. The query engine formulates queries(typically SQL) and passes them on to the data tier, through a nativedatabase API (such as ODBC) for execution.

The data tier contains database management systems (DBMS), which manageraw data stored in a database. Examples of such systems include Oracle,DB2, and Microsoft SQL Server.

Although a multi-tier architecture can be configured in severaldifferent ways, a typical configuration places each tier on a separatecomputer (server). A database server is typically a “high end” server,and thus can process queries at a relatively fast speed. An applicationserver cannot generally process queries as quickly as a database server.

In order to solve many business questions, a query engine may generateSQL queries that utilize The SQL/OLAP technology introduced in theSQL-99 standard. However, many database systems do not support thistechnology. Thus, the SQL queries would have to be performed on thereport server that is generally slower than the database server. It isdesirable to have as much processing performed on the database server.

There is a need to prevent or reduce the amount of local (applicationserver) processing required to process a summary filter.

One way of overcoming this problem is for the query engine to generate abasic query to retrieve the data required to process the filter and allpost-filter aggregates. Unfortunately, this solution requires processingtime on the report server. It is desirable to have a way of transferringthe SQL queries to the database server with minimal processing on thereport server.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a method of summaryfilter transformation in a database system that does not support SQL-99standard.

In accordance with an embodiment of the present invention, there isprovided a system for summary filter transformation. The systemcomprises a summary filter analysis module for analysing amultidimensional query that is not supported by a target databasesystem, and a summary filter transformation module for transforming themultidimensional query into a semantically equivalent query that issupported by the target database system.

In accordance with another embodiment of the present invention, there isprovided a method of summary filter transformation. The method comprisesthe steps of analysing a multidimensional query that is not supported bya target database system, and transforming the multidimensional queryinto a semantically equivalent query that is supported by the targetdatabase system.

In accordance with an embodiment of the present invention, there isprovided a method of summary filter transformation. The method comprisesthe steps of analysing a summary filter transformation to determine anoverall filter grouping level, analysing a transformation select list todetermine if a transformation is to be performed, creating a derivedtable, traversing the transformation select list to move PREFILTERaggregates and aggregates computed at the filter grouping level into thederived table, and extracting and moving aggregates from the summaryfilter into a derived table select list.

In accordance with an embodiment of the present invention, there isprovided a computer data signal embodied in a carrier wave andrepresenting sequences of instructions which, when executed by aprocessor, cause the processor to perform a method of summary filtertransformation. The method comprises the steps of analysing amultidimensional query that is not supported by a target databasesystem, and transforming the multidimensional query into a semanticallyequivalent query that is supported by the target database system.

In accordance with an embodiment of the present invention, there isprovided a computer-readable medium having computer readable codeembodied therein for use in the execution in a computer of a method ofsummary filter transformation. The method comprises the steps ofanalysing a multidimensional query that is not supported by a targetdatabase system, and transforming the multidimensional query into asemantically equivalent query that is supported by the target databasesystem.

In accordance with an embodiment of the present invention, there isprovided a computer program product for use in the execution in acomputer of a group query transformation system for summary filtertransformation. The computer program product comprises a summary filteranalysis module for analysing a multidimensional query that is notsupported by a target database system, and a summary filtertransformation module for transforming the multidimensional query into asemantically equivalent query that is supported by the target databasesystem.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a typical data access environment.

FIG. 2 shows a summary filter transformation system, in accordance withan embodiment of the present invention.

FIG. 3 shows in a flowchart an example of a method of summary filtertransformation, in accordance with the summary filter transformationsystem.

FIG. 4 shows in a flowchart another example of a method of summaryfilter transformation, in accordance with the summary filtertransformation system.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 shows a typical data access environment 10 for processing data.Typically, data is stored in a database 11. A DBMS running on a databaseserver 12 accesses the raw data stored in the database 11. A queryengine 15, running on a report server (or application server) 13 is usedto generate reports on the raw data and instruct the DBMS on thedatabase server 12 to obtain information pertaining to the raw data inthe database 11. The query engine 15 provides universal data access to avariety of heterogeneous database systems. An end user uses a clientapplication 14, running on a client workstation, to facilitateapplication server 13 operations.

In order to solve many business questions, a query engine 15 generatesSQL queries that utilize the SQL/OLAP (Online Analytical Programming)technology introduced in the SQL-99 standard. These SQL queries includeSQL/OLAP functions (windowed aggregates). However, many database systems12 do nor support this technology. In order to prevent or reduce theamount of local (application server) processing required to processthese types of queries, the query engine 15 attempts to generatesemantically equivalent queries that can be processed on the databaseserver 12 by the target database system. These semantically equivalentqueries include standard aggregate functions and the GROUP BY operator.

FIG. 2 shows a summary filter transformation system 20, in accordancewith an embodiment of the present invention. The summary filtertransformation system 20 comprises a summary filter analysis module 21for analysing SQL/OLAP queries that are not supported by a targetdatabase system, and a summary filter transformation module 22 fortransforming the SQL/OLAP queries into semantically equivalent queriesthat are supported by the target database system.

The summary filter transformation system 20 is implemented as asub-system of the query engine 15 in the data access environment 10.This transformation 20 may generate queries that can be processed intheir entirety on the database server 12, or queries that requireprocessing on both the application server 13 and the database server 12.

Advantageously, the summary filter transformation system 20 reducesprocessing that might otherwise be required on an application server,thereby improving performance in many cases. Furthermore, the summaryfilter transformation system 20 takes advantage of functionalityprovided by a target database system.

There are two types of OLAP functions: framed functions and reportfunctions. Framed OLAP functions contain a window frame specification(ROWS or RANGE) and an ORDER BY clause. Through window frames,capabilities such as cumulative (running) sums and moving averages canbe supported. Report functions do not contain a window framespecification, and produce the same value for each row in a partition.

The SQL language is extended to include a FILTER clause that allows thespecification of a summary filter (note that this clause is not part ofthe current SQL standard). Unlike the WHERE clause, which is appliedbefore any OLAP functions in the select list are computed, the FILTERclause is applied before some OLAP functions are computed, and afterothers are computed.

The SQL language is also extended to include a PREFILTER keyword in anOLAP function specification to allow control of when the function iscomputed in the presence of a FILTER clause. Any OLAP function withPREFILTER specified is computed before the FILTER clause is applied,while all others are computed after.

The summary filter transformation generates a derived table and standardWHERE clause to apply the filter condition. Before describing thistransformation, a couple of definitions are provided:

-   A group is a list of expressions over which an aggregate is    computed, and is specified by either the FOR clause or AT clause,    depending on the type of aggregate. For instance, given the    aggregate SUM(QTY) OVER (PARTITION BY SNO, PNO), the group is (SNO,    PNO).-   Two groups C1 and C2 are compatible if C1 and C2 are identical, or    C1 is a subset/superset of C2. For instance, the groups (SNO, PNO)    and (SNO) are compatible, but the groups (SNO) and (PNO) are not.

FIG. 3 shows in a flowchart an example of a method of SQL grouptransformation (30), in accordance with an embodiment of the group querytransformation system 20. The method (30) begins with analysing a querycontaining a group query that is not supported by a target databasesystem (31). Next, the query is transformed into a semanticallyequivalent query that is supported by the target database system (32).The method (30) is done (33).

FIG. 4 shows in a flowchart another example of a method of summaryfilter transformation (40), in accordance with the summary filtertransformation system 20. The method (40) begins with analyzing asummary filter condition to determine an overall filter grouping level(41). Next, a select list is analyzed to determine how thetransformation should be performed (42). The first step in performingthe transformation (43) is to create a derived table (44). Next, theselect list is traversed, moving PREFILTER aggregates and aggregatescomputed at the filter grouping level into the derived table, andperforming the appropriate conversion on all other aggregates (45).Next, aggregates are extracted from the summary filter and moved into aselect list of the derived table (46). The method (40) is now done (47).

As described above, the first step in performing the summary filtertransformation (40) is to analyze the summary filter condition todetermine an overall filter grouping level (if any) (41). Preferably,step (41) is accomplished by first enumerating all groups using thefollowing rules:

-   -   A specific group is derived from each aggregate appearing in the        filter condition.    -   For report aggregates having a standard aggregate counterpart        (MIN, MAX, SUM, AVG, COUNT, and COUNT(*)), the group is derived        from the FOR clause.    -   For all other aggregates, the group is derived from the AT        clause.    -   For non-aggregate filter conditions, the group is derived from        the detail column references.

To determine how to perform the transformation (42), all enumeratedgroups are compared to determine an overall grouping level. If allgroups are compatible, the group with the lowest level of granularity(group with the most columns) is chosen as the overall filter group. Forinstance, if the enumerated groups are (SNO), and (SNO, PNO), the filtergroup is (SNO, PNO). If the groups are not compatible, the filter groupis NULL, and no optimization can be performed.

Some examples are given in the following table:

FILTER FILTER Condition Group SUM(QTY) OVER (PARTITION BY SNO) > 100(SNO) SUM(QTY) OVER (PARTITION BY SNO, PNO) > (SNO, AVG(QTY) OVER(PARTITION BY SNO) PNO) RANK( ) OVER (PARTITION BY SNO ORDER BY QTY)*NULL AVG(QTY) OVER (PARTITION BY SNO) > 100 RANK( ) OVER (AT SNO, PNO,JNO ORDER BY QTY)* (SNO, SUM(QTY) OVER (PARTITION BY SNO) > 100 PNO,JNO) SUM(QTY) OVER (PARTITION BY SNO) > NULL SUM(QTY) OVER (PARTITION BYPNO) SNO > ‘S2’ (SNO)

If no optimization can be performed, a simple transformation isperformed. Otherwise, aggregates in the select list are analyzed andreplaced with equivalent expressions in an effort to avoid introducingdetail information into the inner select. This might involve replacingthe aggregate all together, or replacing the aggregate operand withanother aggregate (a nested aggregate) computed at the same level as theFILTER group.

The basic steps in performing the transformation are as follows:

-   1. Construct a derived table (44).-   2. Traverse the select list of the original query, performing the    following actions (45):    -   a. Move PREFILTER aggregates and aggregates with a grouping        level that matches the grouping level of the FILTER condition        into the derived table.    -   b. For aggregates MIN, MAX, and SUM, the replace the operand        with an aggregate computed at the same level as the FILTER        group, and an AT clause is introduced to eliminate duplicates        values from the computation.    -   c. Replace AVG with an equivalent expression involving SUM and        COUNT.    -   d. Replace COUNT and COUNT(*) with equivalent SUM aggregate        expressions.-   3. Traverse the FILTER condition, moving detail columns and    aggregates into the select list of the derived table (46).

Assuming the FILTER group is (SNO, PNO), the action taken for variousaggregates is described below:

-   SUM(QTY) OVER (PARTITION BY SNO)    -   Replace with XSUM(C1 AT SNO, PNO FOR SNO), where C1=XSUM(QTY FOR        SNO, PNO) and add C1 to the inner select.-   AVG(QTY) OVER ( )    -   Replace with XSUM (C1 AT SNO, PNO)/XSUM (C2 AT SNO, PNO), where        C1=SUM(QTY) OVER (PARTITION BY SNO, PNO), C2=COUNT(QTY) OVER        (PARTITION BY SNO, PNO), and add C1 and C2 to the inner select.-   MAX(QTY) OVER (PARTITION BY SNO, PNO)    -   Move the aggregate into inner select, since it is computed at        the same level as the FILTER group.-   COUNT(QTY) OVER (PARTITION BY SNO)    -   Replace with SUM(C1) OVER (AT SNO, PNO PARTITION BY SNO), where        C1=COUNT(QTY) OVER (PARTITION BY SNO, PNO), and add C1 to the        inner select.

The following examples are provided to illustrate the functionality ofthe summary filter transformation system (20) and methods (30), (40):

Example 1

In this example, a simple summary filter is illustrated.

Original Query SELECT SNO, PNO, SUM( QTY ) OVER ( PARTITION BY SNO ),SUM( QTY ) OVER ( PARTITION BY SNO, PNO ) FROM SUPPLY FILTER SUM( QTY )OVER ( PARTITION BY SNO, PNO ) > 100 Transformed Query SELECT T1.C0,T1.C1, SUM( T1.C2 ) OVER ( AT T1.C0, T1.C1 PARTITION BY T1.C0 ), T1.C2FROM ( SELECT SNO C0, PNO C1, SUM( QTY ) OVER ( PARTITION BY SNO, PNO )C2 FROM SUPPLY ) T1 WHERE T1.C2 > 100Explanation

The FILTER condition is first analyzed, and the group is determined tobe (SNO, PNO). A derived table is then constructed whose select listcontains the required detail information (SNO, PNO) and the aggregateappearing in the condition. The first SUM in the main select list iscomputed based on the SUM in the derived table. Since it's group is(SNO), an AT clause is added to its specification to eliminated doublecounting. The second SUM is identical to the SUM in the derived table,so it is replaced accordingly.

Example 2

In this example, use of the PREFILTER keyword in an OLAP function isillustrated.

Original Query SELECT SNO, PNO, SUM( QTY ) OVER ( PARTITION BY SNO ),SUM( QTY ) OVER ( PARTITION BY PNO PREFILTER ) FROM SUPPLY FILTER SUM(QTY ) OVER ( PARTITION BY SNO, PNO ) > 100 Trarsformed Query SELECTT1.C0, T1.C1, SUM( T1.C2 ) OVER ( AT T1.C0, T1.C1 PARTITION BY T1.C0 ),T1.C3 FROM ( SELECT SNO C0, PNO C1, SUM( QTY ) OVER ( PARTITION BY SNO,PNO ) C2, SUM( QTY ) OVER ( PARTITION BY PNO ) C3 FROM SUPPLY ) T1 WHERET1.C2 > 100After applying the GROUP query transformation on the derived table, thequery becomes:

SELECT T1.C0, T1.C1, SUM( T1.C2 ) OVER ( AT T1.C0, T1.C1 PARTITION BYT1.C0 ), T0.C1 FROM ( SELECT T2.C0 C0, T2.C1 C1, T1.C2 C2, T0.C1 C3 FROM( SELECT PNO C0, SUM( QTY ) C1 FROM SUPPLY GROUP BY PNO ) T0, ( SELECTSNO C0, PNO C1, SUM( QTY ) C2 FROM SUPPLY GROUP BY SNO, PNO) T1, (SELECT SNO C0, PNO C1 FROM SUPPLY ) T2 WHERE T2.C0 = T1.C0 OR ( T2.C0 ISNULL AND T1.C0 IS NULL ) AND T2.C1 = T1.C1 OR ( T2.C1 IS NULL AND T1.C1IS NULL ) AND T2.C1 = T0.C0 OR ( T2.C1 IS NULL AND T0.C0 IS NULL ) ) T1WHERE T1.C3 > 100Explanation

The FILTER condition is first analyzed, and the group is determined tobe (SNO, PNO). A derived table is then constructed whose select listcontains the required detail information (SNO, PNO) and the aggregateappearing in the condition. The first SUM in the main select list iscomputed based on the SUM in the derived table. Since it's group is(SNO), an AT clause is added to its specification to eliminated doublecounting. The second SUM has a group of (PNO), which does not match thegroup of the FILTER condition, but The PREFILTER keyword is specified,so it is moved into the derived table.

Example 3

In this example, the effect the presence of the AVG function has on thetransformation is illustrated.

Original Query SELECT SNO, PNO, MAX( QTY ) OVER ( PARTITION BY SNO, PNO), AVG( QTY ) OVER ( ) FROM SUPPLY FILTER SUM( QTY ) OVER ( PARTITION BYSNO, PNO ) > 100 Transformed Query SELECT T1.C0, T1.C1, T1.C2, SUM(T1.C3 ) OVER ( AT T1.C0, T1.C1 ) / SUM( T1.C4 ) OVER ( AT T1.C0, T1.C1 )FROM ( SELECT SNO C0, PNO C1, MAX( QTY ) OVER ( PARTITION BY SNO, PNO )C2, SUM( QTY ) OVER ( PARTITION BY SNO, PNO ) C3, COUNT( QTY ) OVER (PARTITION BY SNO, PNO ) C4 FROM SUPPLY ) T1 WHERE T1.C3 > 100After applying the GROUP query transformation on the derived table, thequery, becomes:

SELECT T1.C0, T1.C1, T1.C2, SUM( T1.C3 ) OVER ( AT T1.C0, T1.C1 ) / SUM(T1.C4 ) OVER ( AT T1.C0, T1.C1 ) FROM ( SELECT T1.C0 C0, T1.C1 C1, T0.C2C2,T0.C3 C3, T0.C4 C4 FROM ( SELECT SNO C0, PNO C1, MAX( QTY ) C2, SUM(QTY ) C3, COUNT( QTY ) C4 FROM SUPPLY GROUP BY SNO, PNO ) T0, ( SELECTSNO C0, PNO C1 FROM SUPPLY ) T1 WHERE T1.C0 = T0.C0 OR ( T1.C0 IS NULLAND T0.C0 IS NULL ) AND T1.C1 = T0.C1 OR ( T1.C1 IS NULL AND T0.C1 ISNULL ) ) T1 WHERE T1.C3 > 100Explanation

The FILTER condition is first analyzed, and the group is determined tobe (SNO, PNO). A derived table is then constructed whose select listcontains the required detail information (SNO, PNO) and the aggregateappearing in the condition. The MAX function has a group of (SNO, PNO)which matches the group of the FILTER condition, so it is added to thederived table. The AVG function has a group of ( ), which does not matchthe group of the FILTER condition, so it must be replaced by anexpression that involves aggregates computed at the same grouping levelas the FILTER condition. Hence, a SUM and COUNT aggregate are added tothe derived table, and the AVG function is replaced. The AT clauses inthe two SUM function in the outer select eliminate double counting.

Example 4

In this example, the effect the presence of the DISTINCT keyword has onthe transformation is illustrated.

Original Query SELECT DISTINCT SNO, PNO, SUM( QTY ) OVER ( PARTITION BYSNO ), SUM( QTY ) OVER ( PARTITION BY SNO, PNO ) FROM SUPPLY FILTER SUM(QTY ) OVER ( PARTITION BY SNO, PNO ) > 100 Transformed Query SELECTT1.C0, T1.C1, SUM( T1.C2 ) OVER ( PARTITION BY T1.C0 ), T1.C2 FROM (SELECT SNO C0, PNO C1, SUM( QTY ) C2 FROM SUPPLY GROUP BY SNO, PNO ) T1WHERE T1.C2 > 100The query above can then be reformulated as follows:

SELECT T1.C0, T1.C1, SUM( T1.C2 ) OVER ( PARTITION BY T1.C0 ), T1.C2FROM ( SELECT SNO C0, PNO C1, SUM( QTY ) C2 FROM SUPPLY GROUP BY SNO,PNO HAVING SUM( QTY ) > 100 ) T1Explanation

The FILTER condition is first analyzed, and the group is determined tobe (SNO, PNO). A derived table is then constructed whose select listcontains the required detail information (SNO, PNO) and the aggregateappearing in the condition. Because of the presence of the DISTINCTkeyword, and the fact that the detail information required are columnsin the FILTER condition group; a GROUP BY can be introduced into thederived table. The first SUM can be computed based on the SUM in thederived table—no AT clause is required since the GROUP BY eliminates thepossibility of duplicates. The second SUM is the same as the SUM in thederived table, so it is replaced accordingly. Finally, the DISTINCTkeyword can be eliminated since the GROUP BY inside the derived tableensures that there will be no duplicate rows.

The systems and methods according to the present invention may beimplemented by any hardware, software or a combination of hardware andsoftware having the functions described above. The software code, eitherin its entirety or a part thereof; may be stored in a computer readablememory. Further, a computer data signal representing the software codethat may be embedded in a carrier wave may be transmitted via acommunication network. Such a computer readable memory and a computerdata signal are also within the scope of the present invention, as wellas the hardware, software and the combination thereof.

While particular embodiments of the present invention have been shownand described, changes and modifications may be made to such embodimentswithout departing from the true scope of the invention.

What is claimed is:
 1. A method, in a data processing system having aprocessor, of summary filter query transformation, the methodcomprising: receiving, in a summary filter transformation system of thedata processing system, a query having a select list, a from element,and a summary filter having a filter condition; analyzing, by ananalysis module of the summary filter transformation system, the filtercondition to determine a filter group of the filter condition, thefilter group comprising a list of expressions over which the filtercondition is computed; creating, by the analysis module, a derived tablefor computing the filter condition, the derived table having a selectlist, creating the derived table comprising: adding the list ofexpressions of the filter group to the derived table as one or morecolumns of the derived table's select list; and adding the filtercondition to the derived table as a one or more columns of the derivedtable's select list; transforming, by a transformation module of thesummary filter transformation system, the received query by combiningthe received query with the derived table, transforming the receivedquery comprising: traversing the select list of the received query andtransforming one or more aggregates of the select list to reference oneor more of the columns of the derived table; transforming the fromelement of the received query to reference the derived table; and addinga WHERE clause to the transformed original query, the WHERE clause basedon the filter condition and referencing one or more of the columns ofthe derived table.
 2. The method as claimed in claim 1, wherein creatingthe derived table further comprises: identifying aggregates in theselect list of the received query having a PREFILTER clause; adding theidentified PREFILTER aggregates from the select list of the receivedquery to the select list of the derived table; and replacing thePREFILTER aggregates in the select list of the received query with areference to the added PREFILTER aggregate in the derived table.
 3. Themethod as claimed in claim 1, wherein analyzing the filter condition todetermine the filter group comprises: identifying aggregates of thefilter condition; for each identified aggregate, identifying anaggregate group of the aggregate, the aggregate group comprising a listof expressions over which the aggregate is computed; and selecting theaggregate group with the lowest level of granularity as the filtergroup.
 4. The method as claimed in claim 3, wherein identifying anaggregate group comprises: determining the type of the aggregate; whenthe aggregate is a report aggregate having a standard aggregatecounterpart, deriving the aggregate group based on a FOR clause of theaggregate; and when the aggregate is a non-report aggregate, derivingthe aggregate group based on an AT clause of the aggregate.
 5. Themethod as claimed in claim 3, wherein the standard aggregates compriseat least one of: MIN; MAX; SUM; AVG; COUNT; or COUNT(*).
 6. The methodas claimed in claim 1, further comprising determining that the FILTERtransformation can be performed, comprising: determining an aggregategroup for each aggregate of the filter condition; and determining thatall of the determined aggregate groups are compatible, including:determining the aggregate group with the lowest level of granularity;determining that each aggregate group is a subset of the aggregate groupwith the lowest level of granularity or that each aggregate group isidentical to the aggregate group with the lowest level of granularity.7. A data processing system, comprising: a query engine; and a summaryfilter transformation system coupled to the query engine, wherein thesummary filter transformation system is configured to: receive a queryhaving a select list, a from element, and a summary filter having afilter condition; analyze the filter condition to determine a filtergroup of the filter condition, the filter group comprising a list ofexpressions over which the filter condition is computed; create aderived table for computing the filter condition, the derived tablehaving a select list, creating the derived table comprising: adding thelist of expressions of the filter group to the derived table as one ormore columns of the derived table's select list; and adding the filtercondition to the derived table as a one or more columns of the derivedtable's select list; transform the received query by combining thereceived query with the derived table, transforming the received querycomprising: traverse the select list of the received query andtransforming one or more aggregates of the select list to reference oneor more of the columns of the derived table; transform the from elementof the received query to reference the derived table; and add a WHEREclause to the transformed original query, the WHERE clause based on thefilter condition and referencing one or more of the columns of thederived table.
 8. The data processing system as claimed in claim 7,wherein the summary filter transformation system is configured to createthe derived table further by: identifying aggregates in the select listof the received query having a PREFILTER clause; adding the identifiedPREFILTER aggregates from the select list of the received query to theselect list of the derived table; and replacing the PREFILTER aggregatesin the select list of the received query with a reference to the addedPREFILTER aggregate in the derived table.
 9. The data processing systemas claimed in claim 7, wherein the summary filter transformation systemis configured to analyze the filter condition to determine the filtergroup by: identifying aggregates of the filter condition; for eachidentified aggregate, identifying an aggregate group of the aggregate,the aggregate group comprising a list of expressions over which theaggregate is computed; and selecting the aggregate group with the lowestlevel of granularity as the filter group.
 10. The data processing systemas claimed in claim 9, wherein the summary filter transformation systemis configured to identify an aggregate group by: determining the type ofthe aggregate; when the aggregate is a report aggregate having astandard aggregate counterpart, deriving the aggregate group based on aFOR clause of the aggregate; and when the aggregate is a non-reportaggregate, deriving the aggregate group based on an AT clause of theaggregate.
 11. The data processing system as claimed in claim 9, whereinthe standard aggregates comprise at least one of: MIN; MAX; SUM; AVG;COUNT; or COUNT(*).
 12. The data processing system as claimed in claim7, wherein the summary filter transformation system is furtherconfigured to determine that the FILTER transformation can be performed,comprising: determining an aggregate group for each aggregate of thefilter condition; and determining that all of the determined aggregategroups are compatible, including: determining the aggregate group withthe lowest level of granularity; and determining that each aggregategroup is a subset of the aggregate group with the lowest level ofgranularity or that each aggregate group is identical to the aggregategroup with the lowest level of granularity.
 13. A computer programproduct comprising a non-transitory computer-readable medium furthercomprising: computer-readable code for receiving a query having a selectlist, a from element, and a summary filter having a filter condition;computer-readable code for analyzing the filter condition to determine afilter group of the filter condition, the filter group comprising a listof expressions over which the filter condition is computed;computer-readable code for creating a derived table for computing thefilter condition, the derived table having a select list, creating thederived table comprising: adding the list of expressions of the filtergroup to the derived table as one or more columns of the derived table'sselect list; and adding the filter condition to the derived table as aone or more columns of the derived table's select list;computer-readable code for transforming the received query by combiningthe received query with the derived table, transforming the receivedquery comprising: traversing the select list of the received query andtransforming one or more aggregates of the select list to reference oneor more of the columns of the derived table; transforming the fromelement of the received query to reference the derived table; and addinga WHERE clause to the transformed original query, the WHERE clause basedon the filter condition and referencing one or more of the columns ofthe derived table.
 14. The computer program product as claimed in claim13, the creating the derived table further comprising: identifyingaggregates in the select list of the received query having PREFILTERclause; adding the identified PREFILTER aggregates from the select listof the received query to the select list of the derived table; andreplacing the PREFILTER aggregates in the select list of the receivedquery with a reference to the added PREFILTER aggregate in the derivedtable.
 15. The computer program product as claimed in claim 13, theanalyzing the filter condition to determine the filter group furthercomprising: identifying aggregates of the filter condition; for eachidentified aggregate, identifying an aggregate group of the aggregate,the aggregate group comprising a list of expressions over which theaggregate is computed; and selecting the aggregate group with the lowestlevel of granularity as the filter group.
 16. The computer programproduct as claimed in claim 15, the identifying an aggregate groupfurther comprising: determining the type of the aggregate; when theaggregate is a report aggregate having a standard aggregate counterpart,deriving the aggregate group based on a FOR clause of the aggregate; andwhen the aggregate is a non-report aggregate, deriving the aggregategroup based on an AT clause of the aggregate.
 17. The computer programproduct as claimed in claim 15, wherein the standard aggregates compriseat least one of: MIN; MAX; SUM; AVG; COUNT; or COUNT(*).
 18. Thecomputer program product as claimed in claim 13, further comprisingcomputer-readable code for determining that the FILTER transformationcan be performed, determining further comprising: determining anaggregate group for each aggregate of the filter condition; anddetermining that all of the determined aggregate groups are compatible,including: determining the aggregate group with the lowest level ofgranularity; and determining that each aggregate group is a subset ofthe aggregate group with the lowest level of granularity or that eachaggregate group is identical to the aggregate group with the lowestlevel of granularity.